#! /bin/bash

current_path=`pwd`
current_dir_name=`basename $current_path`
echo "准备更新: $current_dir_name"
UPLOAD_LIB_NAME="$current_dir_name"
echo "请输入要升级的tag"
read LIB_TAG
echo "请输入1确认"

echo "准备上传: $UPLOAD_LIB_NAME tag:$LIB_TAG"
read affirm
if [[ $affirm != "1" ]]; then
	echo "退出"
	exit	
fi

git add .
git commit -m "$LIB_TAG"
git tag $LIB_TAG

git push origin master
git push --tags
g
pod trunk push "$UPLOAD_LIB_NAME.podspec" --use-libraries --allow-warnings --verbose

